In human color vision, color constancy is the ability of the visual system to preserve the appearance of an object under a wide range of light sources. For example, because of color constancy in human color vision, colored objects are perceived such that they largely maintain their color appearance even under illuminants that differ greatly.
Imaging systems, either film or electronic photo-sensors, lack this ability and thus do not exhibit color constancy. It is therefore incumbent on the operator to ensure that an image is captured with good color balance, for example, white balance.
In shooting film, color balance is typically achieved by using color correction filters over lighting for the scene or over the camera lens. Image data acquired by imaging photo-sensors must be transformed from the acquired values to new values that are appropriate for color reproduction or display. Several aspects of the acquisition and display process make such color correction important, including the facts that the acquisition sensors do not match the sensors in the human eye; that the properties of the display medium must be accounted for; and that the ambient viewing conditions of the acquisition differ from the display viewing conditions.
In photography and image processing, color balance is sometimes thought of as the global adjustment of the intensities of the colors (typically red, green, and blue primary colors). An important goal of this adjustment is to render specific colors, in particular neutral colors, correctly; hence, the general method is sometimes called gray balance, neutral balance, or white balance. Color balance changes the overall mixture of colors in an image and is used for color correction. An image that is not color balanced is said to have a color cast, or to exhibit color failure, as everything in the image appears to have been shifted towards one color or another. Color balancing may be thought in terms of removing this color cast.
Algorithms and techniques used to attain color constancy are frequently used for color balancing. Conceptually, color balancing consists of two steps: first, determining the illuminant under which an image was captured; and second, scaling the channels of the image to eliminate the color cast. There is a large literature on how one might estimate the ambient illumination from the camera data and then use this information to transform the image data. A variety of algorithms have been proposed such as Bayesian method, artificial neural network, or retinex. An example of a Bayesian method is provided at G. Finlayson, P. M. Hubel and S. Hordley, “Color by correlation: a simple, unifying framework for color constancy”, IEEE Transactions on Pattern Analysis and Machine Intelligence 23, 1209-1221 (2001). An example of artificial neural network is provided at B. Funt, V. Cardei and K. Barnard, “Learning color constancy”, in Proceedings of the Fourth IS&T/SID Color Imaging Conference, pp. 58-60, 1996. An example of retinex is provided at E. H. Land and J. McCann, “Lightness and retinex theory”, J. Opt. Soc. Am. 61, 1-11 (1971).
Currently, the most common implementation of illuminant estimation in digital cameras is based on variations of Bayesian method by calculating ratios of the channels, for example, red/green or red/blue and estimating the illumination based on statistics of these ratios.